home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / bootcode.arc / SAMPLEBT.ASM < prev   
Assembly Source File  |  1991-06-13  |  1KB  |  44 lines

  1. ;
  2. ;Sample application program to be used with customized boot routine.
  3. ;
  4. cseg    segment
  5.     assume    cs:cseg,ds:cseg
  6.     org    100h    ;COM files start at offset 100 (hex)
  7. start    proc    far
  8. ;
  9. ;Output greeting string.
  10. ;
  11.     mov    si,offset greeting_string
  12.     call    string_out    ;Display initial message
  13. ;
  14. ;Program is finished-enter an infinite loop.
  15. ;
  16. end_loop:
  17.     jmp    end_loop
  18. ;
  19. ;Label strings.
  20. ;
  21. greeting_string    db    0dh,0ah,'Congratulations!',0dh,0ah
  22.     db    0dh,0ah,'You have booted a sample application program.'
  23.     db    0dh,0ah,0
  24. start    endp
  25. ;
  26. ;Subroutine outputs the string starting at SI.  String is terminated
  27. ;  with a 0 byte.
  28. ;
  29. string_out    proc    near
  30.     lodsb        ;Get the next character
  31.     and    al,al    ;Is it a 0 byte to mark end?
  32.     jnz    not_end
  33.     ret        ;If so, we're done
  34. not_end:
  35.     push    si
  36.     sub    bh,bh    ;Display page 0
  37.     mov    ah,14    ;Teletype-like character output function #
  38.     int    10h    ;Display the character
  39.     pop    si
  40.     jmp    string_out
  41. string_out    endp
  42. cseg    ends
  43.     end    start    ;Program is to begin at label START
  44.